A more robust way to deal with the module renaming, as it will handle different given names better.