Fix connection manager

Targets #580.