subsequence bug fix