Topic: 3DES CBC Encryption and Decryption

I use the test key:
static const unsigned char des3_test_keys[24] =
{
    0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
    0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01,
    0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01, 0x23
};

this test key is for 3 types of key, 1-key, 2-key and 3-key
The program will run through 3 types of key mode: 1-key, 2-key and 3-key

What I am trying to do is Decrypt a buffer and then restore it by encrypt with the same key, I can do it successfully with ECB mode, but I was get lost in CBC even though I understand that they are only different at XOR gate, the program log is below:

Program started: running  des_self_test( 1 )
The initial buffer is: 0x4e-0x6f-0x77-0x20-0x69-0x73-0x20-0x74
The IV is 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF


<1-key decryption>
DES -CBC- 56 (dec): The buffer at this step is:
0x4e-0x6f-0x77-0x20-0x69-0x73-0x20-0x74
The IV at this step is:
0x12-0x34-0x56-0x78-0x90-0xab-0xcd-0xef
The buffer AFTER this step is:
0x12-0x9f-0x40-0xb9-0xd2-0x0-0x56-0xb3
The IV AFTER this step is:
0xf2-0x19-0xc-0xd-0xb4-0x3e-0xfd-0x11

<1-key encryption>
 DES -CBC- 56 (enc): The buffer at this step is:
0x12-0x9f-0x40-0xb9-0xd2-0x0-0x56-0xb3
The IV at this step is:
0x12-0x34-0x56-0x78-0x90-0xab-0xcd-0xef
The buffer AFTER this step is:
0xfa-0xde-0x66-0xf6-0x6d-0xfb-0xeb-0xcd
The IV AFTER this step is:
0xfa-0xde-0x66-0xf6-0x6d-0xfb-0xeb-0xcd

You can see that the buffer AFTER encryption is not as the same as the initial buffer 
and this happens for two other types of key modes: 
  DES3-CBC-112 (dec): The buffer at this step is:
0x4e-0x6f-0x77-0x20-0x69-0x73-0x20-0x74-
The IV at this step is:
0x12-0x34-0x56-0x78-0x90-0xab-0xcd-0xef-
The buffer AFTER this step is:
0x47-0xe-0xfc-0x9a-0x6b-0x8e-0xe3-0x93
The IV AFTER this step is:
0x33-0xcb-0x6d-0x52-0xd-0xb2-0x92-0x9d
  DES3-CBC-112 (enc): The buffer at this step is:
0x47-0xe-0xfc-0x9a-0x6b-0x8e-0xe3-0x93
The IV at this step is:
0x12-0x34-0x56-0x78-0x90-0xab-0xcd-0xef
The buffer AFTER this step is:
0xce-0xf-0x82-0xc9-0xa8-0xb7-0xea-0x47
The IV AFTER this step is:
0xce-0xf-0x82-0xc9-0xa8-0xb7-0xea-0x47


  DES3-CBC-168 (dec): The buffer at this step is:
0x4e-0x6f-0x77-0x20-0x69-0x73-0x20-0x74
The IV at this step is:
0x12-0x34-0x56-0x78-0x90-0xab-0xcd-0xef
The buffer AFTER this step is:
0xc5-0xce-0xcf-0x63-0xec-0xec-0x51-0x4c
The IV AFTER this step is:
0xd4-0x8a-0x7b-0x54-0x6b-0x8a-0xf7-0xb6
  DES3-CBC-168 (enc): The buffer at this step is:
0xc5-0xce-0xcf-0x63-0xec-0xec-0x51-0x4c
The IV at this step is:
0x12-0x34-0x56-0x78-0x90-0xab-0xcd-0xef
The buffer AFTER this step is:
0xbe-0xfa-0x71-0xeb-0xad-0x91-0x55-0x53
The IV AFTER this step is:
0xbe-0xfa-0x71-0xeb-0xad-0x91-0x55-0x53

Can anyone explain to me what is happening here?