Fix aspect ratio logic