rewrite fix