Fix state reset logic