Fix stop_all for detatched processes