fix an assortment of issues