fix findAMatch bug