Fixed regression in refactoring engine