quick fixes for the R code to make tests pass