Fix the tag selection behavior