cmutex should be complete, and bug fixes