Fixed to work with Ubuntu's XML::TreeBuilder