Fixed bug when downloading files could timeout.