fix a few bugs
fix the bug when rsmooth is equal to rc