The right to a retirement allowance, of a person who had retired prior to the effective date of the termination of a contract, or who has qualified and applied for retirement by written document received at the board’s office in Sacramento, prior to the effective date, even though the board does not approve the application until a later date, and the right of any person to a benefit on account of a death that occurred prior to the effective date, is not affected by termination of the contract, unless the contracting agency fails to make the contributions required of it because of the participation of its employees in this system.