A bug fix and code-cleaning in MuonMET and MuonMETAlgo