Improve handling of legacy events