fix matching of similar source and destination