added some quit handling