Fixed resize viewport bug.