Fix error when deleting exceptions