Fix error introduced in refactoring