fix reduce