fixed bug in unittest