Fix computation of aspect ratio