Partial fix for #193 until span range issue is fixed.
Helper func for #193