Quit GTK if unhandled exception occurs - fix import
Simplify selection mode check