fix bugs in return_csv + return_json when :max is set