Fix some refactoring oversights