Fixing a deprecated method issue.