fix synchronization

getDimvalues can also add to the dimension, protect it properly