Improve scaling of images