try to exit ncurses properly on error ...