make animations exit when the program has an exception