Fixes to range sweep