Optimistic locks fixes - lock type is changed