fix behavior on connect