Fix parser.
Convert unit tests to integration test and fix bug.