Updated for latest SDK.