BUG: R CMD check revealed some coding errors