fix the big  bug on connection