fixed terminal resize issue