Fix scaleToHeight and scaleToWidth