fixed some connection bugs?