Minor fixes for bounded integers, rewrite engine.