fixed 1 refactor bug