Fix a bug in DNS lookup.
Update version to 1.3.1.