Improve range detection and highlight