fixed use of wrong matching function