diff --git a/Cargo.lock b/Cargo.lock
index 7cbeacf84634f85cca65a8c06247bbe7d19634fc..440cdd3c84545524770076f4b9467ec62f217f51 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -442,6 +442,18 @@ dependencies = [
  "pin-project-lite",
 ]
 
+[[package]]
+name = "fac"
+version = "0.1.0"
+dependencies = [
+ "async-std",
+ "clap",
+ "hercules_rt",
+ "juno_build",
+ "rand",
+ "with_builtin_macros",
+]
+
 [[package]]
 name = "fastrand"
 version = "2.1.1"
diff --git a/Cargo.toml b/Cargo.toml
index 63579146428581973a4c93e987160ad415ea0418..8fa3079ba4d2ad04b48607f24d6813e08dcf3006 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@ members = [
 
 	"hercules_samples/dot",
 	"hercules_samples/matmul",
-	#"hercules_samples/fac",
+	"hercules_samples/fac",
 
 	"juno_frontend",
 	"juno_scheduler",
diff --git a/hercules_opt/src/inline.rs b/hercules_opt/src/inline.rs
index bd192c39772d3cf70e764ad5761b7465246acd78..ecc8027f408766b50d4e370d11212b40955f7572 100644
--- a/hercules_opt/src/inline.rs
+++ b/hercules_opt/src/inline.rs
@@ -197,7 +197,7 @@ fn inline_func(
 
             // Stich the control use of the original call node's region with
             // the predecessor control of the inlined function's return.
-            edit = edit.replace_all_uses(control, called_return_pred)?;
+            edit = edit.replace_all_uses(control, old_id_to_new_id(called_return_pred))?;
 
             // Stitch uses of parameter nodes in the inlined function to the IDs
             // of arguments provided to the call node.
diff --git a/juno_frontend/src/lib.rs b/juno_frontend/src/lib.rs
index 96fefb7f0e9d374a48ddc4691545aa9910edaf69..cccadbdd5a768b7ac193e7117cbe888f2917d88f 100644
--- a/juno_frontend/src/lib.rs
+++ b/juno_frontend/src/lib.rs
@@ -151,6 +151,7 @@ pub fn compile_ir(
     if x_dot {
         pm.add_pass(hercules_opt::pass::Pass::Xdot(true));
     }
+    add_pass!(pm, verify, Inline);
     add_pass!(pm, verify, CCP);
     add_pass!(pm, verify, DCE);
     add_pass!(pm, verify, GVN);