Fix wrong use of timedelta