Fix incorrect behavior for small number of intervals.
Merge pull request #4 from mckinsel/master

Fix incorrect behavior for small number of intervals.