shut curses down properly on exit / exception