fix reset handling