Corrected a bug with "threshold" being treated as a string, not a float.