Minor fixes, and bug wrangling.