Fixing mutex actions. Threads next.