Refactoring failures fixed