Replaced deprecated APIs.