Fixed mutex implementation.