Fixed self connection bug