bug fix on t-test code