Fixed so that the last event is filled in tree.