IsConnected fix

Fixed the GetIsConnected function.