Fix up two refactor bugs.