Fix deprecated error