fix callback on connect