Fix NextSequence().