Tartaros: Fixed bug with generate event function.