Fix a bug of mgt