deliver callbacks on the main thread