Fixed crash with no event hook class