rewrites fix