fix issue #8

issue detail : if batch's elment number < batch number, the last group
batch maybe empty