Fix mortar hang and add watchdog.