Added missing mutex locks