fix lcs error, len(string)+1 for matrix size