fix memory problem with download