Fix deprecated method.