some rewrite issues