Fix broken threshold comparison

They must be interpreted as integers in order for the comparisons
to work.