Fixed an interval counting bug.