fixup use of range