Update code to new SDK changes.