fixing tag-selecting behavior