fix a bug in Valid Palindrome Solution