Clock sync: fix several bugs
Broken commit with fixes from cluser for future work in IDE.