Fix bug when duration could not be determined.