Fixed tagged_with function