Fix in production issue with rewrite