Fixed issue #2379, removed also locks in OSecurityShared