Improve selector in legend