Fix Stax parser code