Fix mistake in chunksize calculation