some changes necessary to pass R CMD check --as-cran