diff --git a/mbtrack2/tracking/rf.py b/mbtrack2/tracking/rf.py
index 3abc5dc844a0b4ab5f4702918207ffdf5e8313b7..1bfdce7003926ec0cc77e83eae4340e894ee2cbc 100644
--- a/mbtrack2/tracking/rf.py
+++ b/mbtrack2/tracking/rf.py
@@ -387,10 +387,11 @@ class CavityResonator():
 
                 if beam.mpi_switch:
                     # get shared bunch profile for current bunch
+                    beam.mpi.share_distributions(beam, n_bin=self.n_bin)
                     center = beam.mpi.tau_center[j]
                     profile = beam.mpi.tau_profile[j]
-                    bin_length = beam.mpi.tau_bin_length[j]
-                    charge_per_mp = beam.mpi.charge_per_mp_all[j]
+                    bin_length = float(beam.mpi.tau_bin_length[j][0])
+                    charge_per_mp = float(beam.mpi.charge_per_mp_all[j])
                 else:
                     if i == 0:
                         # get bunch profile for current bunch
@@ -529,8 +530,8 @@ class CavityResonator():
                 beam.mpi.share_distributions(beam, n_bin=self.n_bin)
                 center[:, index] = beam.mpi.tau_center[j]
                 profile[:, index] = beam.mpi.tau_profile[j]
-                bin_length[index] = beam.mpi.bin_length[j]
-                charge_per_mp[index] = beam.mpi.charge_per_mp_all[j]
+                bin_length[index] = float(beam.mpi.tau_bin_length[j][0])
+                charge_per_mp[index] = float(beam.mpi.charge_per_mp_all[j])
             else:
                 (bins[:, index], sorted_index, profile[:, index],
                  center[:, index]) = bunch.binning(n_bin=self.n_bin)
diff --git a/tests/unit/tracking/test_rf.py b/tests/unit/tracking/test_rf.py
index 1f89e38c3be4c556a5b8ea3177c7ea5cabfbdbd2..6c0cb0e75190c64b9a7bd1776b620b32f2f0a6cf 100644
--- a/tests/unit/tracking/test_rf.py
+++ b/tests/unit/tracking/test_rf.py
@@ -105,6 +105,19 @@ class TestCavityResonator:
         assert phasor_init_phasor_track != init_phasor
         assert np.allclose(phasor_init_phasor, phasor_init_phasor_track, rtol=1e-2)
         
+    def test_phasor_init_mpi(self, cav_res, beam_1bunch_mpi):
+        init_phasor = cav_res.beam_phasor
+        cav_res.init_phasor_track(beam_1bunch_mpi)
+        phasor_init_phasor_track = cav_res.beam_phasor
+        
+        cav_res.beam_phasor = init_phasor
+        cav_res.init_phasor(beam_1bunch_mpi)
+        phasor_init_phasor = cav_res.beam_phasor
+        
+        assert phasor_init_phasor != init_phasor
+        assert phasor_init_phasor_track != init_phasor
+        assert np.allclose(phasor_init_phasor, phasor_init_phasor_track, rtol=1e-2)
+        
     # Setting detune updates _detune, _fr, _wr, and _psi correctly
     def test_detune(self, cav_res):
         detune_value = 1000