Fixing bug with XML Parser