Fix function deprecation.