fix bug regard to network connectivity