Use better technique for viewport sizing