Minor fix for thread safe dictionary