fix ability to select by function