fixed reset logic