Fix deprecated method use.