fix bug in runTest