Threshold assignment bug fix