Fixed some bugs

I fixed some NullPointerException crashes with the events.