make connection on optional.
Merge branch '4.0'