Modified the setting of thresholds for masks

Fixed bug, it wasn't working
Merge branch 'enh/FixDTKTracker' into unstable