diff --git a/render_povray/__init__.py b/render_povray/__init__.py
index cfb7263203350c0a7b1cf2b2d528c6f6f8b9278d..6d7fb77d2e242d66d2d8246500fb2125a90abd00 100644
--- a/render_povray/__init__.py
+++ b/render_povray/__init__.py
@@ -96,10 +96,10 @@ def register():
             name="Media Color",
             description="The atmospheric media color.",
             subtype='COLOR',
-            precision = 4,
-            step = 0.01,
+            precision=4,
+            step=0.01,
             min=0,
-            soft_max = 1,
+            soft_max=1,
             default=(0.001, 0.001, 0.001),
             options={'ANIMATABLE'})
             
@@ -285,10 +285,10 @@ def register():
             name="Fade Color",
             description="Color of filtered attenuation for transparent materials",
             subtype='COLOR',
-            precision = 4,
-            step = 0.01,
-            min=0,
-            soft_max = 1,
+            precision=4,
+            step=0.01,
+            min=0.0,
+            soft_max=1.0,
             default=(0, 0, 0),
             options={'ANIMATABLE'})
 
@@ -402,7 +402,6 @@ def register():
     ###########################################################################
 
 
-
 def unregister():
     import bpy
     Scene = bpy.types.Scene
diff --git a/render_povray/render.py b/render_povray/render.py
index 5844a0ee8a31052b5126e75f82232f5e9f609f18..6ecae2bd35f349ab3d6fad28d878ddcc1b37e4ec 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -536,10 +536,10 @@ def write_pov(filename, scene=None, info_callback=None):
             tabWrite("rotate  <%.6f, %.6f, %.6f>\n" % tuple([degrees(e) for e in matrix.rotation_part().to_euler()]))
             tabWrite("translate <%.6f, %.6f, %.6f>\n" % (matrix[3][0], matrix[3][1], matrix[3][2]))
             if camera.data.pov_dof_enable and focal_point != 0:
-                tabWrite("aperture %.3g\n"% camera.data.pov_dof_aperture) 
-                tabWrite("blur_samples %d %d\n"% (camera.data.pov_dof_samples_min, camera.data.pov_dof_samples_max))
-                tabWrite("variance 1/%d\n"% camera.data.pov_dof_variance)
-                tabWrite("confidence %.3g\n"% camera.data.pov_dof_confidence)
+                tabWrite("aperture %.3g\n" % camera.data.pov_dof_aperture) 
+                tabWrite("blur_samples %d %d\n" % (camera.data.pov_dof_samples_min, camera.data.pov_dof_samples_max))
+                tabWrite("variance 1/%d\n" % camera.data.pov_dof_variance)
+                tabWrite("confidence %.3g\n" % camera.data.pov_dof_confidence)
                 tabWrite("focal_point <0, 0, %f>\n" % focal_point)
         tabWrite("}\n")
 
@@ -693,7 +693,7 @@ def write_pov(filename, scene=None, info_callback=None):
 
                 if material:
                     diffuse_color = material.diffuse_color
-                    trans= 1.0 - material.alpha
+                    trans = 1.0 - material.alpha
                     if material.use_transparency and material.transparency_method == 'RAYTRACE':
                         povFilter = material.raytrace_transparency.filter * (1.0 - material.alpha)
                         trans = (1.0 - material.alpha) - povFilter
@@ -1707,6 +1707,8 @@ class PovrayRender(bpy.types.RenderEngine):
         povPath = ""
         renderImagePath = ""
 
+        scene.frame_set(scene.frame_current)  # has to be called to update the frame on exporting animations
+
         if not scene.pov_tempfiles_enable:
 
             # check paths
diff --git a/render_povray/ui.py b/render_povray/ui.py
index ba2e2411d11a9c5c14b0cfa0af63cba4b9f3b1c2..0f6af27f9c8ab16e29ea9e6cb9540532b2c26677 100644
--- a/render_povray/ui.py
+++ b/render_povray/ui.py
@@ -134,6 +134,7 @@ class ObjectButtonsPanel():
         rd = context.scene.render
         return obj and (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES)
 
+
 class CameraDataButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
@@ -147,7 +148,6 @@ class CameraDataButtonsPanel():
         return cam and (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES)
 
 
-
 class RENDER_PT_povray_export_settings(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Export Settings"
     COMPAT_ENGINES = {'POVRAY_RENDER'}
@@ -405,6 +405,7 @@ class MATERIAL_PT_povray_metallic(MaterialButtonsPanel, bpy.types.Panel):
         mat = context.material
         layout.active = mat.pov_mirror_metallic
 
+
 class MATERIAL_PT_povray_fade_color(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Interior Fade Color"
     COMPAT_ENGINES = {'POVRAY_RENDER'}
@@ -420,6 +421,7 @@ class MATERIAL_PT_povray_fade_color(MaterialButtonsPanel, bpy.types.Panel):
         mat = context.material
         layout.active = mat.pov_interior_fade_color
 
+
 class MATERIAL_PT_povray_conserve_energy(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "conserve energy"
     COMPAT_ENGINES = {'POVRAY_RENDER'}
@@ -488,7 +490,7 @@ class MATERIAL_PT_povray_caustics(MaterialButtonsPanel, bpy.types.Panel):
                 col.prop(mat, "pov_photons_dispersion", slider=True)
             col.prop(mat, "pov_photons_reflection")
             
-            if mat.pov_refraction_type=="0" and not mat.pov_photons_reflection:
+            if mat.pov_refraction_type == "0" and not mat.pov_photons_reflection:
                 split = layout.split()
                 col = split.column()
                 row = col.row()
@@ -499,7 +501,6 @@ class MATERIAL_PT_povray_caustics(MaterialButtonsPanel, bpy.types.Panel):
                 row.label(text="but you didn't chose any !")
 
 
-
 class TEXTURE_PT_povray_tex_gamma(TextureButtonsPanel, bpy.types.Panel):
     bl_label = "Image Gamma"
     COMPAT_ENGINES = {'POVRAY_RENDER'}
@@ -540,6 +541,7 @@ class OBJECT_PT_povray_obj_importance(ObjectButtonsPanel, bpy.types.Panel):
         col.label(text="Photons")
         col.prop(obj, "pov_collect_photons", text="Receive Photon Caustics")
 
+
 class Camera_PT_povray_cam_dof(CameraDataButtonsPanel, bpy.types.Panel):
     bl_label = "POV-Ray Depth Of Field"
     COMPAT_ENGINES = {'POVRAY_RENDER'}
@@ -570,5 +572,3 @@ class Camera_PT_povray_cam_dof(CameraDataButtonsPanel, bpy.types.Panel):
 
         col.prop(cam, "pov_dof_samples_max")
         col.prop(cam, "pov_dof_confidence")
-        
-