diff --git a/R/RunModel.Supervisor.R b/R/RunModel.Supervisor.R
index 78f6f2bf90b65c28173228aba8bd67e6c44fa75f..3c9518fd7b6ac8a661c2235a5cab01fe9ca5fa29 100644
--- a/R/RunModel.Supervisor.R
+++ b/R/RunModel.Supervisor.R
@@ -57,7 +57,7 @@ RunModel.Supervisor <- function(x, RunOptions, Param, ...) {
   )
   if (length(getDiversionRows(x$griwrm)) > 0) {
     # Outputs of Diversion nodes
-    Qdiv_m3 <- Qsim_m3[, sv$griwrm$id[getDiversionRows(x$griwrm)], drop = FALSE] * NA
+    Qdiv_m3 <- Qsim_m3[, x$griwrm$id[getDiversionRows(x$griwrm)], drop = FALSE] * NA
     Qnat <- Qdiv_m3
   }
 
diff --git a/vignettes/V06_Modelling_regulated_diversion.Rmd b/vignettes/V06_Modelling_regulated_diversion.Rmd
index f8f4c3646711f44bfb79712f5423c3930abf62ef..6841a895822f1a69b9778d4f5f12c8022bb601ae 100644
--- a/vignettes/V06_Modelling_regulated_diversion.Rmd
+++ b/vignettes/V06_Modelling_regulated_diversion.Rmd
@@ -152,9 +152,8 @@ First we need to create a `GRiwrmRunOptions` object and load the parameters cali
 
 ```{r}
 # Running simulation between 2002 and 2005
-IndPeriod_Run <- seq(
-  which(DatesR == as.POSIXct("2002-01-01")),
-  which(DatesR == as.POSIXct("2005-01-01"))
+IndPeriod_Run <- which(
+  DatesR >= as.POSIXct("2002-01-01") & DatesR <= as.POSIXct("2005-01-01")
 )
 IndPeriod_WarmUp = seq(IndPeriod_Run[1] - 366,IndPeriod_Run[1] - 1)
 RunOptions <- CreateRunOptions(IM_div,