fix synchronization bugs between leader and follower