Removed use of deprecated api.