fixed getmatches bug