fixes to the parser