Fix threshold exception
related pull request to original repo:
https://github.com/berk/tr8n/pull/51
Merge pull request #2 from epdp/fix_threshold_exception

Fix threshold exception