Fixed the load and unload process managed by the mds

Signed-off-by: Claudio Bisegni <Claudio.Bisegni@lnf.infn.it>