Further bug fixes found during regression testing.