fixed bug in get_timestamp