dispatch to main thread if the initialize method called is called from another thread