Bug fix in connections