Fixing timestamp handling