Insures that callback is always called on main thread.