Simplified unmatched quote fix algorithm