fixed a bug not allowing "0" treshold..