fix bad refactoring