diff --git a/mocap/mocap_constraints.py b/mocap/mocap_constraints.py
index 58fbdbac8b9970f3bbd141ceb849796d337f7253..a8d88c3a435c3fadf1dffee5b41e9b7a5780635c 100644
--- a/mocap/mocap_constraints.py
+++ b/mocap/mocap_constraints.py
@@ -20,7 +20,7 @@
 
 import bpy
 from mathutils import Vector
-from bl_operators import nla
+from bpy_extras import anim_utils
 from .  import retarget
 
 
@@ -383,8 +383,14 @@ def bakeAllConstraints(obj, s_frame, e_frame, bones):
     constraintStrip.frame_start = s_frame
     constraintStrip.frame_end = e_frame
     if selectedBones:
-        #Use bake function from NLA Bake Action operator
-        nla.bake(s_frame, e_frame, action=constraintStrip.action, only_selected=True, do_pose=True, do_object=False)
+        # Use bake function from NLA Bake Action operator
+        anim_utils.bake_action(s_frame,
+                               e_frame,
+                               action=constraintStrip.action,
+                               only_selected=True,
+                               do_pose=True,
+                               do_object=False,
+                               )
     if simpleBake:
         #Do a "simple" bake, location only, world space only.
         locBake(s_frame, e_frame, simpleBake)