fixed search function for tags