some bugfixing