Corrected free(event)