fix possible deadlock when a new download is started from the download finished callback