Fix mismatched types comparison