Ensure callback is made on the main thread