lib: emit updates earlier