Change to ensure child context is created on the main thread.