Changed endwin to resizeterm