fix require rewrite