fix regression after refactoring