ReadWriteLock fixes