Fixed recent deprecations usage of updated APIs.