Added support for multiple connections.