Thresholds
Fixed typecast