fixed regression introduced during previous refactoring