Fixed rare segfault in tpFlagEarlyStop