Updating code from Agora fixed issue