Add quit handling