Some more incorrect locks fixed (shared_lock instead of unique_lock)