fixed the duration issue (#5)