Fix sql operator bug