bugfix for sync