fixed duration issue #5
Merge pull request #18 from ytung/master

Fixed issue #5