fix some bug for plan api -- missing files