Changed mutexes
Small changes to code