Updating code from Agora fixed issues