Fix link selection bug