Improved xml scanner for this bug