Deglobalize default threshold value, and fix initialization of threshold variable.
Merge pull request #1369 from AndrejMitrovic/IsemailFix

Deglobalize default threshold value, and fix initialization of threshold variable