Multiple fixes before tackling sync
Fixed sync's functionality