Fix viewport resize issue.