UniqueTag cannot be cast to Function