fix when reading Rscripts