fixed bug where deleted threads caused thread tools to disappear (js
error)