7.x bug fixes

An assortment of fixes for bugs.