Fix R CMD check problems