fix discrete distribution