Fixing bug update thread bug
Fixing bug in Thread class