fix timestamp bugs