Fixed the bug concerning synchronization and rnd exchange and tested.…