Fix for on_signal error, and  more

just got an exception testing example, simple fix for that.