fix rewrite rule