Implemented a locking mechanism in the ModuleLoader to avoid concurrency issues when loading modules. Crude but effective.