Fixed a bug creating connections