Minor fixes to pass R CMD CHECK