Fixed bug in create event handler refactoring.