minor fix to Gateway.isConnected()