Updated the usage of static mutexes