clock sync: fix state mashine