Fix up some refactor bugs