Fixed refactoring mistake