Fix up refactoring error