clear states when connect to network