diff --git a/io_mesh_uv_layout/__init__.py b/io_mesh_uv_layout/__init__.py
index e7da8c7b780c44af1219f1879966bb6585f19b0e..7256bbeff633cedff2ea7cb45b241356c4709707 100644
--- a/io_mesh_uv_layout/__init__.py
+++ b/io_mesh_uv_layout/__init__.py
@@ -301,14 +301,14 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.utils.register_module(__name__)
+    bpy.utils.register_class(ExportUVLayout)
     bpy.types.IMAGE_MT_uvs.append(menu_func)
 
 
 def unregister():
-    bpy.utils.unregister_module(__name__)
+    bpy.utils.unregister_class(ExportUVLayout)
     bpy.types.IMAGE_MT_uvs.remove(menu_func)
 
 
-if __name__ == "__main__":
+if __name__ == 'io_mesh_uv_layout':
     register()