Ncurses Printing issue solved