fixes to help pass R CMD check