Added reset handling.