fix refactor bug.