fixed reading error from xmlfile