Fixed division by zero when interval contains zero.
Fixes #150.