fix for a bug in haveSameAspectRatio function

issue#17