Bugfix on migration of images