Fixed the bug in OnDownloadsComplete