Small fixes to parser