bad refactoring bug