fix bug checking for is connected before calling connect
0.1.1