fix errors on longest palindrome