Fixed bug in stop connection