Numerous fixes to reduction host code