Removed use of deprecated APIs