fix detect exitepoch at first time