#377 fix the issue in matchDomain method