Fixes #2

check network state