Fix critical bug in sharecount reducer.