fix multi rewrite