Fix bug where modules can be loaded twice