Shouldn't these steps still be done before closing the window to loose the reference to the modules?