Fixed bug wrt sequences that are too short or empty.