Fixes crash related to wrong thread access at onLoadFailed