Fix up some minor bugs.