diff --git a/lib/unipept/lib/unipept/api_runner.rb b/lib/unipept/lib/unipept/api_runner.rb
index <HASH>..<HASH> 100644
--- a/lib/unipept/lib/unipept/api_runner.rb
+++ b/lib/unipept/lib/unipept/api_runner.rb
@@ -185,7 +185,7 @@ module Unipept
       first = peptides.next
       if first.start_with? '>'
         # FASTA MODE ENGAGED
-        fasta_header = first
+        fasta_header = first.chomp
         peptides.each_slice(batch_size).with_index do |sub,i|
           fasta_mapper = {}
           sub.map! {|s| s.chomp}
fix issue with newline in first case