Fixed bug with multiple connections created