Fixes in the new rewriting