Fixed race condition while loading and calling the factory method to create instances of modules. Still second iteration over that logic to see if it can be improved even more.