More XML parser fixes