fixed bug where order of loaded modules was switched