Change lock to a write lock