Avoid the deprecated API