fix done() in connection callback