Fixed possible race condition, added mutex to MediaDownloadTask