fix for aggregating zero grades
Merge branch 'master2'