Fix a bug in Valid Palindrome Solution