Fixed mutex problem