quit properly