fixes to parser and compiler