Fix rewrites not working