Fixes for R CMD check