fix bug in download logic