Updated to make calls from the UI thread.

Also made a change to ensure callbacks are only called once