mutex usage is corrected