Don't rely on comparator returning -1
Merge pull request #780 from hneuer/qssignum

Don't rely on comparator returning -1