Changed deprecated method call.