some bugfixes