Fix a regression where _duration_ wasn't used.

Introduced in 7df482d15b4b4dca22d702578502f880fd49263a.