Update casting of duration