Handle negative and zero durations
Merge pull request #20 from ukstv/master

Handle negative and zero durations