Fixed broken refactoring