So I still haven't figured anything out for fixes \
the mutexes. What I have done though, is kill the processes that are running
This prevents the queue thingw hen exiting the shell.
Not a solution to the problem only prevents it.