Fixing problems with R CMD check