Fixed refactor bug.