fix bug in mds_remove