Fix invert selection slowness