Fix layer selection in select tool