Fixed bug when smallest label is assigned to 0 in majority voting