added a better check for trace events going outside timeline boundaries