fix duplicate timestamp bug