diff --git a/io_mesh_stl/stl_utils.py b/io_mesh_stl/stl_utils.py
index e320774dca8268572e15bf22475840c1a2370369..282409abb71cd33f08d1d1d45744325bb85b0135 100644
--- a/io_mesh_stl/stl_utils.py
+++ b/io_mesh_stl/stl_utils.py
@@ -49,9 +49,9 @@ def mmap_file(filename):
     with open(filename, 'rb') as file:
         # check http://bugs.python.org/issue8046 to have mmap context
         # manager fixed in python
-        map = mmap.mmap(file.fileno(), 0, access=mmap.ACCESS_READ)
-        yield map
-        map.close()
+        mem_map = mmap.mmap(file.fileno(), 0, access=mmap.ACCESS_READ)
+        yield mem_map
+        mem_map.close()
 
 
 class ListDict(dict):
diff --git a/io_scene_3ds/export_3ds.py b/io_scene_3ds/export_3ds.py
index fc8d7117e92adf3d4d2f23953f26abe161e3f6cc..714d419af49063fa31181357e68fcaaf92912b01 100644
--- a/io_scene_3ds/export_3ds.py
+++ b/io_scene_3ds/export_3ds.py
@@ -446,7 +446,7 @@ def make_material_texture_chunk(id, images):
     """
     mat_sub = _3ds_chunk(id)
 
-    def add_image(img):
+    def add_image(image):
         import bpy
         filename = bpy.path.basename(image.filepath)
         mat_sub_file = _3ds_chunk(MATMAPFILE)