You also run the risk of multiple alerts being displayed, which will completely break this. You should add a `if (errorAlert == nil) {` check **inside** of the dispatch_async.