check that we are connected after attempting to connect, fixes #51