Make alias works with required modules

If user has some required module, then the alias won't work for these module. 
This PR will fix this issue.
I simply just move the execution orders.