fix removing of pthread