Fix OptimisticLockException.