fixed local connection bugs