Fix a handful of small bugs.