fix rscripts