Fix auto-highlighting issues and behaviors