fixed bug for test code