several syntax parser fixes