Properly handle uninitialized connection
Merge pull request #156 from sanpii/multiple_connections

Properly handle uninitialized connection.