Only reset when necessary