Various synchronization fixes