Updated thread close