fix reduce unit tests