Fixed wrong resolution in portrait mode