Fix deprecated call