Fix zero range calculation.