fix some bugs (test time error)