Changed checking network connection