fix a bug in LabeledDocReducer