Fixes for event creation and custom events