bug fixes
for sync. DO NOT BUILD!