fix bug of unit tests