Replaced reader-writer lock with a simpler lock on write only