added a couple of isConnected() versions
bug fixes