Fix incomplete refactoring