Same as last commit but for ncurses