Fixed min and max height not respected in getFixed().

When using aspectRatio setting together with either minSize or maxSize (or both), only the minimum and maximum **width** was respected, **not height**. 

This issue was fixed by adding some logic in getFixed() function.

Also added a few comments to make code more readable.