Update to run callback code on the main queue as appropriate