small change to table locking