fix a parser bug.
Further fix to make tests pass.