Reset and stop running on exception