Fixed some (maybe all) parser bugs