fixed join so it would terminate when one of the processes will get killed.