FIX: it was not possible to set 0 as threshold value