fix require order problems in erc