Fixes window for portrait mode.