Fixed bug 10844 - incorrect evaluation of threshold parameter, should use ton() rather than ston().