fixing bug where synonym matches were overwriting normal matches