Fix to not miss last sequence in file