Fix unittest failure.

Hi Citruspi, 
I submitted the patch for unittest problem. 
Please review it.

thanks,
Charz