fixed the bug with timestamp