Some ncurses bugfixes