add protection against too many resets