fixed argument handling in findMatch