Added connect function so everytime open function is called then
 connect is called if isOpen function is false