minor bug corrections with connections.