diff --git a/tracking/monitors/monitors.py b/tracking/monitors/monitors.py
index a543fdf91704dda41a9958b3e2cb9ce05735a681..f0f8a4d6d86e05a6747346f7ed2b17e2e73388bd 100644
--- a/tracking/monitors/monitors.py
+++ b/tracking/monitors/monitors.py
@@ -218,27 +218,32 @@ class Monitor(Element, metaclass=ABCMeta):
         except ValueError:
             pass
         
-    def track_bunch_data(self, object_to_save):
+    def track_bunch_data(self, object_to_save, check_empty=False):
         """
         Track method to use when saving bunch data.
         
         Parameters
         ----------
         object_to_save : Beam or Bunch
+        check_emptiness: bool
+            If True, check if the bunch is empty. If it is, then do nothing.
         """
         if self.track_count % self.save_every == 0:
+            
             if isinstance(object_to_save, Beam):
                 if (object_to_save.mpi_switch == True):
-                    if object_to_save.mpi.bunch_num == self.bunch_number:
-                        self.to_buffer(object_to_save[object_to_save.mpi.bunch_num])
+                    bunch = object_to_save[object_to_save.mpi.bunch_num]
                 else:
-                    self.to_buffer(object_to_save[self.bunch_number])
+                    bunch = object_to_save[self.bunch_number]
             elif isinstance(object_to_save, Bunch):
-                self.to_buffer(object_to_save)
+                bunch = object_to_save
             else:                            
                 raise TypeError("object_to_save should be a Beam or Bunch object.")
+                
+            if (check_empty == False) or (bunch.is_empty == False):
+                self.to_buffer(bunch)
+                
         self.track_count += 1
-        
             
 class BunchMonitor(Monitor):
     """
@@ -672,7 +677,7 @@ class ProfileMonitor(Monitor):
         ----------
         object_to_save : Bunch or Beam object
         """        
-        self.track_bunch_data(object_to_save)
+        self.track_bunch_data(object_to_save, check_empty=True)
         
 class WakePotentialMonitor(Monitor):
     """
@@ -1004,8 +1009,11 @@ class BunchSpectrumMonitor(Monitor):
             raise TypeError("object_to_save should be a Beam or Bunch object.")
         
         if skip is False:
-            for key, value in self.track_dict.items():
-                self.positions[value, :, self.save_count] = bunch[key][self.index_sample]
+            try:
+                for key, value in self.track_dict.items():
+                    self.positions[value, :, self.save_count] = bunch[key][self.index_sample]
+            except IndexError:
+                self.positions[value, :, self.save_count] = np.nan
             
             self.mean[:, self.save_count] = bunch.mean[self.mean_index]
             
diff --git a/tracking/particles.py b/tracking/particles.py
index e7939e8444dfb05ced7623817993ad10db95aedc..f4351c1a6be418aa07e842891389bcd7479b4ecf 100644
--- a/tracking/particles.py
+++ b/tracking/particles.py
@@ -76,6 +76,8 @@ class Bunch:
         Number of particles in the bunch.
     current : float
         Bunch current in [A].
+    is_empty : bool
+        Return True if the bunch is empty.
     mean : array of shape (6,)
         Mean position of alive particles for each coordinates.
     std : array of shape (6,)
@@ -192,6 +194,11 @@ class Bunch:
     @current.setter
     def current(self, value):
         self.charge_per_mp = value * self.ring.T0 / self.__len__()
+        
+    @property
+    def is_empty(self):
+        """Return True if the bunch is empty."""
+        return ~np.any(self.alive)
     
     @property    
     def mean(self):