Fixing bug in synchronization.