Fix dynamic rewrite base