fixed bug in operator matching function