Fix require order bug