Fix viewport scaling issue