fixing mutexes