re-fix rand -1.