do the reset in a finally block.