Fix duration helper + add test