fixed bug for timestamp