Changing the implementation to the latest SDK changes.