fix bug in timestamp