Make branch 31 compatible with upstream API