fixing parsing bugs.