corrected refactoring error