Fixes for R CMD CHECK