fix empty selector crash