Get rid of deprecated API usage: