Fixed a couple of issues with the aspect ratio code.