added a pause after sending the 'die' message to all workers to give them time to terminate. Hopefully, this solves some errors I am having about threadsafety of fork()s and system calls with MPI.