Fix bad refactoring