rewrite rule fix