changed rewrite flag