Ensure that completion handlers are executed on the main queue.