fix plan api