Bugfixes to model-sync and tests
Bugfix for server tests