Bug fixes in the sequence parsing