Fix incomplete refactor