fix bug in findLongestPalindrome