fixes a bug in Mw from M0 calculation