fix mass computation