fix bug in discreteNums