fixed bug with loading XML file