Better thread handling on destroy.