Adapt to some API change in rmisc
fix documentation