Some fixes in ncurses logic