Fix thread cleanup