Fixed broken refactor