Remove the session after generating a module