optimistic locking bug fixed