Fixed a bug.

Never get more than batchsize.