fix bug in Longest Valid Parentheses