Fix crash when server address can not be resolved
Add no memory checks