Fixed a bug where the xml tree wasn't parsed again when changing packages