[3.8] Fix #1408 download issue with large amount of collections

- Fix #1408
- Fix overflow issue