diff --git a/evaluators/melody_eval.py b/evaluators/melody_eval.py
index <HASH>..<HASH> 100755
--- a/evaluators/melody_eval.py
+++ b/evaluators/melody_eval.py
@@ -66,10 +66,10 @@ def evaluate(reference_file, estimated_file):
     # Check if missing sample at time 0 and if so add one
     if ref_time[0] > 0:
         ref_time = np.insert(ref_time, 0, 0)
-        ref_freq = np.insert(ref_freq, 0, ref_voicing[0])
+        ref_freq = np.insert(ref_freq, 0, ref_freq[0])
     if est_time[0] > 0:
         est_time = np.insert(est_time, 0, 0)
-        est_freq = np.insert(est_freq, 0, est_voicing[0])
+        est_freq = np.insert(est_freq, 0, est_freq[0])
     # Get separated frequency array and voicing boolean array
     ref_freq, ref_voicing = mir_eval.melody.freq_to_voicing(ref_freq)
     est_freq, est_voicing = mir_eval.melody.freq_to_voicing(est_freq)
corrected value inserted into time 0 when missing