solving issues introduced by an old refactoring