fixed losing peers if a hostname cannot be resolved
escaping white spaces when sending remote picture