bugfix: incorrect number of rows per chunk calculation