Fixed CSV export on amount of records with pagination