Changed isConnected to connected