parser fixes and tests