FP: Ensure script is aborted when dialog is dismissed.