fixed rewrites, other handling