Removed reliance on a deprecated method.