make isConnected work