Fix regression after refactoring