fixed some connection bug