BUG: Corrected refactoring bug