Document lock mechanism and known bug