diff --git a/get_train_annot.py b/get_train_annot.py
index 92ee2b4f7f3b6babba76ddccd57cea9db5a28107..0ebe2870bb2c16796069ce887d82836b2c44a4bd 100755
--- a/get_train_annot.py
+++ b/get_train_annot.py
@@ -34,9 +34,9 @@ def main(entry, arguments, species_list):
     # Create the list of all possible offset to compute spectrogram
     offset_list = np.arange(
         0, file_duration, arguments.duration - arguments.overlap)
-    new_pos = utils.split_annotations(
+    grp = utils.split_annotations(
         grp, arguments.duration)
-    grp = pd.merge(grp, new_pos)
+    grp = pd.reset_index(drop=True)
     while len(grp) != 0:
         # collect all the data between the offset and duration-overlap
         if len(offset_list) >= 1: