Fix OnConnected not getting called