fix regression in which selection does not work