Call handlers on the main thread synchronously to enhance responsivity (fix #462)