Fixed bugs when synchronization was not complete