fix for rewrite rule flush