Fixed deprecated method call.