Fixed deprecated API.