Fix duration returns negative value