fixed rewrites