Fix comparisons functions, likely fixes issue #8596.
Merge pull request #3844 from Safety0ff/wconv

Fix comparisons functions