fix the bug in palindrome.c