Fix the Refactor BUG