Fix bug when miners have no shares causing crash