fix bug in DistinctSubsequences