Fix off by one when copying rows

if (# of rows in table % batch size) == 1
then the last row would be missed in the copy.