Fix to work with Rscript