Fix possible crash in loadPeers() (closes #222)