Fix bug in thread delection routine in javascript.