some minor fixes,
changed data sync logic