fixed mutex deadlock