fix a possible address family mismatch.