Fixed issue with syntax checking.

The fix has been tested on Linux and Windows.

fixes #195.