Fixed crash when logging out while a download is active