fix socket leak