More miscellaneous bug fixes.