Better reset logic