fix download exceed memory limit