fix wait for sync