Fix comparison errors, e.g. issue #26