Fix and improve in mass inverse calculation