Fixed bugs related with synchronization problems.