Replaced a deprecated method.