Tweaked event handling and sync.