fixed peer lookup if hostname has multiple ip addresses (issue #153)