Improved the getting of the sequence.