It was using the termcap window size instead of asking the system.