Fixed refactoring problem