few fixes corresponding to CRAN submission