Fix SEGV fault during exit of app when still tabs open