fixed segfault when event called on object that has no events table