Fix bug in sequences indexes