fixed SQL parser issue - AND-OR priority