fixed a regression in refactoring