Fix bad refactor