solve bug when matching figures with no concavity