make sure curses always exits cleanly