Removed unneeded isConnected check.