fixes reset logic