small bugfixes after refactoring