Fixed an issue with parser and added more tests.