fix mutex bug