fix ncurses performance