Fix multiple connection bug