Fix the setting of terminal size.