fixed a stupid refactoring bug