diff --git a/navipy/sensors/renderer.py b/navipy/sensors/renderer.py
index af791f747999b91cb272b8c9bbcf66c5e17a809b..fe38d4896bcd3bc262a584686cd646cde0927b59 100644
--- a/navipy/sensors/renderer.py
+++ b/navipy/sensors/renderer.py
@@ -63,21 +63,27 @@ class BlenderRender():
         output_file.format.file_format = "OPEN_EXR"
         output_file.file_slots.remove(output_file.inputs[0])
         tmp_fileoutput = dict()
-        tmp_fileoutput['Image'] = 'Image'
-        tmp_fileoutput['Depth'] = 'Depth'
-        tmp_fileoutput['Folder'] = tempfile.TemporaryDirectory().name
-        tmp_fileoutput['ext'] = '.exr'
-        output_file.file_slots.new(tmp_fileoutput['Image'])
-        output_file.file_slots.new(tmp_fileoutput['Depth'])
-        output_file.base_path = tmp_fileoutput['Folder']
-        scene.node_tree.links.new(
-            render_layers.outputs['Image'],
-            output_file.inputs['Image']
-        )
-        scene.node_tree.links.new(
-            render_layers.outputs['Z'],
-            output_file.inputs['Depth']
-        )
+	tmp_fileoutput['Image'] = 'Image'
+	tmp_fileoutput['Depth'] = 'Depth'
+	tmp_fileoutput['Folder'] = tempfile.TemporaryDirectory().name
+	tmp_fileoutput['ext'] = '.exr'
+	output_file.file_slots.new(tmp_fileoutput['Image'])
+	output_file.file_slots.new(tmp_fileoutput['Depth'])
+	output_file.base_path = tmp_fileoutput['Folder']
+	scene.node_tree.links.new(
+	    render_layers.outputs['Image'],
+	    output_file.inputs['Image']
+	)
+        if bpy.app.version < (2,79,0):
+	     scene.node_tree.links.new(
+	         render_layers.outputs['Z'],
+	         output_file.inputs['Depth']
+	     )
+        else:
+             scene.node_tree.links.new(
+	         render_layers.outputs['Depth'],
+	         output_file.inputs['Depth']
+	     )
         self.tmp_fileoutput = tmp_fileoutput
 
     @property