OnConnection extended