some fixes for R CMD check