Fix Rewrite issue