Fixed an issue with isConnected not being defined.