switch the callback to ui thread.