bugfix after refactoring