fixed curses.error where too many lines are printed