fix rdiscrete with new bucketize function