selection finally works as it should