make rewrite rule more correct