Fixed a bug on refactoring window