Fix clean_up when not using curses