fixing bug with timestamps