put table update into a synchronize block

There were instances where updates to the table could cause a crash.
This synchronize block should theoretically prevent that problem.