fixed mutex problem