ranges: use NULL instead of zero