fix crash on network disconnectivity. closes #228