Fix the issues in sweep reducer.