fix an important bug when using NCC Distribution.

Signed-off-by: ezheng <ezheng@cs.unc.edu>