changes to support early events (even without gui)