fix the changed API