bug fix for test.c