Fix refactoring error