fix Palindromecuts bugs when determine whether a substr is palindrome.