diff --git a/scripts/run_experiments.jl b/scripts/run_experiments.jl
index c9196e1bb73967223e54ff978ce7a5932b7eb5ed..104a5e861b239dfe24a8dbaf187b9fa1e42b4d16 100644
--- a/scripts/run_experiments.jl
+++ b/scripts/run_experiments.jl
@@ -894,7 +894,7 @@ function add_noise(img; noise_sigma, noise_p)
     img_noisy = img .+ noise_sigma * randn(rng, Float64, size(img))
     for i in eachindex(img)
         if rand(rng) < noise_p
-            img_noisy[i] = rand(Bool) ? 1. : 0.
+            img_noisy[i] = rand(rng, Bool) ? 1. : 0.
         end
     end