Solving problem with synchronization.