Fixed up refactoring error