Stop thread when remove