Fix deprecated error.