lowered the chance of ncurses errors from writing outside a window