fixed curses so it hands back to the terminal