Fixed the events index error 500