Fix in R scripts