Fixed serious bug in findBestMatches not returning the correct number of matches.