Fixing errors related to R CMD check --as-cran