correct some bugfixes