fix NaN occurance chance