diff --git a/image_creator/bundle_volume.py b/image_creator/bundle_volume.py
index 1e7539b03450d188e66b00f996af7f746ac7a9d4..a0364ad4fa3d57ef0d4e9ac7a91f0c38f053ed0e 100644
--- a/image_creator/bundle_volume.py
+++ b/image_creator/bundle_volume.py
@@ -372,8 +372,8 @@ class BundleVolume(object):
                 lines = src.readlines()
             with open(f, 'w') as dest:
                 for line in lines:
-                    for i, uuid in new_uuid.items():
-                        line = re.sub(orig[i], uuid, line)
+                    for i, new in new_uuid.items():
+                        line = re.sub(orig[i], new, line)
                     dest.write(line)
 
     def _create_filesystems(self, image, partitions):
diff --git a/image_creator/dialog_menu.py b/image_creator/dialog_menu.py
index 3d9570c25ccd6335692fc637ba1bb1a697bd4658..dd83b0b7964b69bb769b4955ff33a66cff165d9f 100644
--- a/image_creator/dialog_menu.py
+++ b/image_creator/dialog_menu.py
@@ -49,7 +49,7 @@ from image_creator.kamaki_wrapper import Kamaki, ClientError
 from image_creator.help import get_help_file
 from image_creator.dialog_util import SMALL_WIDTH, WIDTH, \
     update_background_title, confirm_reset, confirm_exit, Reset, \
-    extract_image, extract_metadata_string, add_cloud, edit_cloud
+    extract_image, add_cloud, edit_cloud
 
 CONFIGURATION_TASKS = [
     ("Partition table manipulation", ["FixPartitionTable"],