Fixed the code for unloading modules in the test file