fix for reduce