Fixed some connection issue, and some mistake