fix lagging problem when there are multiple events