Further fixes from a messy push