fixed quit behavior when plots were open