fix bug of test code