fix reduce problem