fix parsing bugs - ref #119