Adjust for changed API