Intervals are now inclusive so 0 actually means 0 not 1.
Fixed broken mutex logic.