diff --git a/module/utils.py b/module/utils.py
index d28cdb8478efe6d181f3213c0c3faa85942c5e5a..3eff1c0c39c7238f8c4bcddade67bbeaeebcd0ab 100644
--- a/module/utils.py
+++ b/module/utils.py
@@ -153,7 +153,7 @@ def armfinder_to_table(data_resistance:pd.DataFrame) ->  pd.DataFrame:
         gene = data_resistance['Gene symbol'][res] + dico_Method[data_resistance['Method'][res]]
         # Search for certain cases of interruption due to a contig end that AMRfinder is unable to find.    
         if is_contig_edge(data_resistance.iloc[res]) : 
-            data_resistance['Method'][res] = "CTRL_CONTIG_END" 
+            data_resistance.loc[res, 'Method'] = "CTRL_CONTIG_END" 
 
         if ('tox' in data_resistance['Gene symbol'][res]) and \
            (float(data_resistance['% Coverage of reference sequence'][res]) != 100.00) and \