Thread.php fixes

Threads show proper lock/unlock state now