fix cnt and endtime bug