Duplicate line;-

      $MHSav = $MHSav + $dev['MHSav'];
      $MHSav = $MHSav + $dev['MHSav'];

removed