Fixed a bug where I miscounted the CSV lines causing no more than 5000 results to be fetched.