Improving error message and undefining of network objects