minor bugfixes for parser