fix rewrite action