Fix bug caused by duration formatting.