Adapted some usages of deprecated API.