Fixed refactoring error