fix to inequality rewrite