Fix rotation in rectangle viewport