Prevented signal or exception handlers to run multiple times