Added check to test that makes sure the case in which the last row is a bit smaller than the batch size gets emitted.