fixed table sync bugs.