fixed rewrites rules