Ensure syncids are int64_t (not just long).

Also fixed (MOB-133,126,122).