fix NPE in EntityEventHandler