Merge pull request #165 from pcostell/master

Request the minimum of limit and batch_size.