Fixing issue with timedelta