Add: improvements and fixings to the handling of defers and panics.