Added network state handling