Fix aspect ratio calculation