Some improvements to range selection