bug fix with replacing elements in time object