More fixes from failed merge