Fixed up code for IAP finalization