fixes to pass cran checks