Changing the threshold type to double