Fixed bugs in test cases for thread
License update