fixed bug with timestamp