some bugfixing on parsing