Small changes to pass R CMD check