adding timeout for sync.