Changed how the duration is retrieved