fixes errors, introduced in refactoring