reset before throw