corrected a stupid mistake in how the extents are computed