fix getmatches bug