Updated from Agora commit 48ea5e1