Removed unnecessary code in viewport setting code