fix bug on require hook