Makes sure we always access managed object context on main thread.