fixing refactoring bug.