Fixed incorrect width to height ratio when resizing.