Fix saving scaled versions of images