fix portion_size bug for the no shuffle case